<template>
<div>
    <h2>第一个页面</h2>
    <span>(类似于选项式API)当前数字为:{{Userstore.count}}</span><br>
    <span>修改后:{{Userstore.doubleCount}}</span><br>
    <span>
        <button @click="Userstore.AddCount">count++</button>
    </span>
    <br>
    <span>(类似于组合式API)当前数字为:{{Student.age}}</span><br>
    <span>修改后:{{Student.doubleAge}}</span><br>
    <span>
        <button @click="Student.AddAge">age++</button>
    </span>
</div>
</template>

<script setup lang="ts">
import { useUserStore,useStudentore } from '../store/index.ts'

//创建函数实例
const Userstore=useUserStore();

const Student=useStudentore();


</script>